"""
filter
Administrator
2023/12/6
convergence-server
"""

from django_filters import FilterSet, filters
from platefrom.models import Skus


class SkusFilter(FilterSet):
    """规格过滤"""
    title = filters.CharFilter(field_name='title', lookup_expr="icontains", label="规格标题")
    labels = filters.CharFilter(field_name='labels', lookup_expr="icontains", label="规格标签")

    class Meta:
        model = Skus
        fields = ('title', 'labels', 'id')
